@import '../../../../../../../assets/styles/variables';

.zone-instance {
    
    width:76px;
    margin:5px;
    opacity:1;

    .zone-instance__handle {
        display:none;
        position:absolute;
        left: 31px;
        top: 8px;
        width:22px;
        height:22px;
        cursor:pointer;
        border: solid @main_color_p 1px;
        border-radius: 2px;
        text-align: center;
        font-weight:bold;
    }

    .zone-instance__body {
        position:relative;
        margin:0 auto;
        width:43px;
        height:43px;
        display:flex;
        padding:3px;
    }

    .zone-instance__body-content {
        border-radius: 2px;
        flex:1;
        color:@main_color_p;
        font-size:16px;
        text-align:center;       
        display:flex;
        align-items: center;
        justify-content: center;
        box-shadow:none;
        transition:box-shadow 5s;
    }

    .zone-instance__name {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        text-align:center;
    }
    /* Dynamic classes below */

    .target-handle {
        position:absolute;
        width:18px;
        height:18px;
        display:block;
        top: -4px;
        right: -6px;
        background-size: 100% 100%;
        cursor: url("../../../../../../../assets/styles/images/canvas-tagging-icons/policy_2.svg"), pointer;

        &.tagged-policy {
            background-image: url('../../../../../../../assets/styles/images/canvas-tagging-icons/policy_added.svg');
        }
    
        &.tag-available {
            background-image: url('../../../../../../../assets/styles/images/canvas-tagging-icons/indication.svg');
        }
    }


    &.mode-1, &.mode-2, &.mode-3 { //hover, selected, tag
        .zone-instance__body {
            border:solid 2px;
            border-radius: 2px;
            padding:2px;
            cursor:pointer;
        }
    }

    &.mode-1, &.mode-2:hover{
        .zone-instance__handle{
            display:block;
        }
    }

    &.locked {
        cursor: inherit;
    }

    &.hiding {
        opacity:0;
        .zone-instance__body-content {
            box-shadow: #CCC 0px 0px 15px;
        }
    }
    

    &.mode-3 .zone-instance__handle {
        width:24px;
        height:24px;
        right:-6px;
        top:7px;
        display:block;
        background-image: linear-gradient(-140deg, #009E98 0%, #97D648 100%);
        border: 2px solid @main_color_p;
        border-radius: 2px;
        box-shadow: inset 2px -2px 3px 0 #007A3E;
    }

}
.sdc-canvas-zone.group-zone {
    .zone-instance__handle {
        background-color:@main_color_a;
    }
    .zone-instance__body {
        border-color:@main_color_a;
        .zone-instance__body-content {
            background: @main_color_a;
        }
    }
}

.sdc-canvas-zone.policy-zone {
    .zone-instance__handle {
        background-color:@main_color_r;
    }
    .zone-instance__body {
        border-color:@main_color_r;
        .zone-instance__body-content {
            background: @main_color_r;
        }
    }
}